<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ include file="common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	$(document).ready(function(){
		var urls = $(".pagelinks a").each(function(index){
			var url = $(this).attr("href");
			$(this).attr("href","javascript:getnextpage('"+url+"');");
			
		});
		
		var urls2 = $(".sortable a").each(function(index){
			var url = $(this).attr("href");
			
			$(this).attr("href","javascript:getnextpage('"+url+"')");
			$(this).attr("onclick","getnextpage('"+url+"');return false;");
		});
		
		
	});
	function getnextpage(url)
	{$("#reportsTable").empty();
		$.get(url,function(data){
				$("#reportsTable").empty().html(data);
			},"html");
		
	}
</script>

</head>
<body>

<div id="reportsTable">

	<display:table name="${itemDetails}" export="true" class="mainTable" defaultorder="ascending" requestURI="availableStockReport.htm">
		
		<display:column property="itemName" title="Item Name" style="width:30%"></display:column>
		<display:column property="itemStock" title="Available Stock" style="width:15%"></display:column>
		<display:column property="minItemStock" title="Minimum Stock" style="width:15%"></display:column>
		<display:column property="itemUnitType" title="Unit" style="width:15%"></display:column>

	</display:table>
	
</div>
</body>

</html>